package com.xr.oa.meeting;

import com.bstek.dorado.common.*;
import com.bstek.dorado.data.*;
import com.bstek.dorado.data.db.DBStatement;
import com.bstek.dorado.view.*;
import com.bstek.dorado.view.data.*;
import com.bstek.dorado.view.control.*;

/**
 * applyListViewModel
 */
public class applyListViewModel extends DefaultViewModel {
  protected void doUpdateData(ParameterSet parameters, ParameterSet outParameters)
      throws Exception {
    // Add your code here
    super.doUpdateData(parameters, outParameters);
  }
  public void cancel(ParameterSet parameters, ParameterSet outParameters)
      throws Exception {
	   DBStatement dbs=new DBStatement();
	   Dataset ds=getDataset("datasetMeetingTime");
	   dbs.setSql("update oa_meeting_time set cancel=1 where meeting_date>sysdate and MEETING_TIME_ID="+ds.getString("MEETING_TIME_ID"));
	   dbs.execute();
	   dbs.close();
    //super.doUpdateData(parameters, outParameters);
  }
  public void delParty(ParameterSet parameters, ParameterSet outParameters)
      throws Exception {
	   DBStatement dbs=new DBStatement();
	   Dataset ds=getDataset("datasetParty");
	   dbs.setSql("delete from oa_meeting_party where MEETING_PARTY_ID="+ds.getString("MEETING_PARTY_ID"));
	   dbs.execute();
	   dbs.close();
    //super.doUpdateData(parameters, outParameters);
  }
}
